< previous page page_679 next page >

Page 679
0679-01.jpg
Figure 30.7
The Script Wizard provides a hierarchical view of events.
Look on the Microsoft Web site for a complete list of the objects and methods available in Internet Explorer.
Forms
Forms are HTML elements used to send information back to the Web server. The following is an example of an HTML form with two text boxes:
<FORM Action="formproc.asp" METHOD="POST" NAME="frmTest">
 Please enter your name and E-Mail address below:<BR>
 Name:  <INPUT Type=Text size=40 name=txtName>   <BR>
 Email: <INPUT Type=Text size=30 name=txtEmail>  <BR>
 <INPUT Type=Submit Name=cmdSend Value="Send Values to Server">
</FORM>
The Submit button tells the browser to send all the <INPUT> fields between the <FORM> tags to the Web server. The Web server (in this case, the Active Server Page formproc.asp) can then access each of these elements and put them in a database. However, before you submit the form to the server, you might want to use VBScript to validate or change the information. Listing 30.3 shows an example of validating form data with VBScript.
Listing 30.3 VBSFORM.ZIPModifying and Submitting a Form with VBScript
<HTML>
<HEAD><TITLE>Simple example of Forms</TITLE></HEAD>
<SCRIPT Language = "VBScript">
<!--
Sub submitform()
continues

 
< previous page page_679 next page >